#!/usr/bin/env python
# encoding: UTF-8

__version__ = "$Revision$"



from numpy import zeros

class Map(object):
    last_id = 0
    def __init__(self, name=None, map=None, dimensions=(30,20)):
        """map is a numpy 2D array. If not specified, created blank from 
        dimensions"""
        Map.last_id = self.id = Map.last_id + 1
        if map is not None:
            self.__map = map
        else:
            self.__map = zeros(dimensions)
        if name is None:
            name = "Map %sx%s" % (dimensions[0], dimensions[1])
        self.name = name
            
    def __str__(self):
        return self.name

maps = [None, Map(name="Blank 30x20"), Map(dimensions=(300,250))]
